<?php
class SmsController extends Controller {

    public function actionIndex() {

        if(isset($_POST['recipient']) && isset($_POST['message'])){
            $phonenum = $_POST['recipient'];
            $message = $_POST['message'];
            $debug = true;
            Common::ozekiSend($phonenum,$message,$debug);
        }

        $this->render('index', array());
    }
	
	public function actionMailtest(){
		$sub = 'Mail test';
		$content = 'Hello test!';
		if(Common::sentMail(Yii::app()->params['adminEmail'], $sub, $content))
			echo 'send TRUE';
		else
			echo 'send FALSE';
	}

}